﻿@{
    Layout = null;
}
<Project @SampleHelper.VaryByVersion(null, "ToolsVersion=\"3.5\"", "ToolsVersion=\"4.0\"") DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>@SampleHelper.VaryByVersion("8.0.50727", "9.0.30729", null)</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>@ViewBag.Project.ProjectGuid.ToString("B")</ProjectGuid>
    <ProjectTypeGuids>@SampleHelper.VaryByViewEngine(null, "{F85E285D-A4E0-4152-9332-AB1D724D3325};", "{E53F8FEA-EAE0-44A6-8774-FFD645390401};"){349c5851-65df-11da-9384-00065b846f21};@ViewBag.Project.TypeGuid.ToString("B")</ProjectTypeGuids>
    <OutputType>Library</OutputType>
    @if (ViewBag.Project.Language == CodeLanguage.Cs)
    {
    <AppDesignerFolder>Properties</AppDesignerFolder>
    }
    <RootNamespace>@ViewBag.Project.Name</RootNamespace>
    <AssemblyName>@ViewBag.Project.Name</AssemblyName>
    @if (ViewBag.Project.TargetFramework >= FrameworkVersion.NET35)
    {
    <TargetFrameworkVersion>@SampleHelper.VaryByFramework(null, "v3.5", "v4.0")</TargetFrameworkVersion>
        if (ViewBag.Project.Language == CodeLanguage.Vb)
        {
    <OptionExplicit>On</OptionExplicit>
    <OptionCompare>Binary</OptionCompare>
    <OptionStrict>Off</OptionStrict>
    <OptionInfer>On</OptionInfer>
        }
        if (ViewBag.Project.ViewEngine == ViewEngine.Mvc)
        {
    <MvcBuildViews>false</MvcBuildViews>
        }
    }
    @if (ViewBag.Project.TargetFramework == FrameworkVersion.NET4)
    {
    <UseIISExpress>false</UseIISExpress>
    }
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <OutputPath>bin\</OutputPath>
    @if (ViewBag.Project.Language == CodeLanguage.Cs)
    {
    <Optimize>false</Optimize>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>    
    }
    else
    {
    <DefineDebug>true</DefineDebug>
    <DefineTrace>true</DefineTrace>
    <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
    }
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\</OutputPath>
    @if (ViewBag.Project.Language == CodeLanguage.Cs)
    {
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    }
    else
    {
    <DefineDebug>false</DefineDebug>
    <DefineTrace>true</DefineTrace>
    <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
    }
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="System" />
    <Reference Include="System.Data" />
    <Reference Include="System.Drawing" />
    <Reference Include="System.Web" />
    <Reference Include="System.Xml" />
    <Reference Include="System.Configuration" />
    <Reference Include="System.Web.Services" />
    <Reference Include="System.EnterpriseServices" />
    @RenderSection("references", false)
    @if (ViewBag.Project.TargetFramework < FrameworkVersion.NET4)
    {
    <Reference Include="System.Web.Mobile" />
    }
    @if (ViewBag.Project.TargetFramework == FrameworkVersion.NET35)
    {
    <Reference Include="System.Core">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.Data.DataSetExtensions">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.Web.Extensions">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.Xml.Linq">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
    }
    else if (ViewBag.Project.TargetFramework == FrameworkVersion.NET4)
    {
      <Reference Include="System.Web.DynamicData" />
      <Reference Include="System.Web.Entity" />
      <Reference Include="System.Web.ApplicationServices" />
      <Reference Include="System.Core" />
      <Reference Include="System.Data.DataSetExtensions" />
      <Reference Include="System.Web.Extensions" />
      <Reference Include="System.Web.Extensions.Design" />
      <Reference Include="System.Xml.Linq" />
    }
        @if (ViewBag.Project.MvcVersion == MvcVersion.Mvc1)
        {
    <Reference Include="System.ComponentModel.DataAnnotations">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.Web.Extensions.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
    <Reference Include="System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
    <Reference Include="System.Web.Abstractions" />
    <Reference Include="System.Web.Routing" />
        }
        else if (ViewBag.Project.MvcVersion == MvcVersion.Mvc2)
        {
    <Reference Include="System.ComponentModel.DataAnnotations">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
    if (ViewBag.Project.TargetFramework != FrameworkVersion.NET4)                
    {
    <Reference Include="System.Web.Extensions.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
    }
    <Reference Include="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
    <Reference Include="System.Web.Abstractions" />
    <Reference Include="System.Web.Routing" />
        }
    else if (ViewBag.Project.MvcVersion == MvcVersion.Mvc3)
    {
      <Reference Include="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
      <Reference Include="System.Web.WebPages" />
      <Reference Include="System.Web.Helpers" />
      <Reference Include="System.ComponentModel.DataAnnotations" />
    }    
    </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\..\Krystalware.SlickUpload\Krystalware.SlickUpload.csproj">
      <Project>{87CB56B1-1FE9-4559-AD57-7DA2D8E8CE4C}</Project>
      <Name>Krystalware.SlickUpload</Name>
    </ProjectReference>
  </ItemGroup>
  @if (ViewBag.Project.Language == CodeLanguage.Vb)
  {
  <ItemGroup>
    <Import Include="Microsoft.VisualBasic" />
    <Import Include="System" />
    <Import Include="System.Collections" />
    <Import Include="System.Collections.Generic" />
    <Import Include="System.Data" />
    <Import Include="System.Diagnostics" />
    <Import Include="System.Collections.Specialized" />
    <Import Include="System.Configuration" />
    <Import Include="System.Text" />
    <Import Include="System.Text.RegularExpressions" />
    <Import Include="System.Web" />
    <Import Include="System.Web.Caching" />
    <Import Include="System.Web.SessionState" />
    <Import Include="System.Web.Security" />
    <Import Include="System.Web.Profile" />
    <Import Include="System.Web.UI" />
    <Import Include="System.Web.UI.WebControls" />
    <Import Include="System.Web.UI.WebControls.WebParts" />
    <Import Include="System.Web.UI.HtmlControls" />
    @if (ViewBag.Project.TargetFramework >= FrameworkVersion.NET35)
    {
    <Import Include="System.Linq" />
    <Import Include="System.Xml.Linq" />
        if (ViewBag.Project.ViewEngine == ViewEngine.Mvc || ViewBag.Project.ViewEngine == ViewEngine.Razor)
        {
    <Import Include="System.Web.Mvc" />
    <Import Include="System.Web.Mvc.Ajax" />
    <Import Include="System.Web.Mvc.Html" />
    <Import Include="System.Web.Routing" />
        }
    }
  </ItemGroup>
  }
  @RenderCodeGroup()
  @RenderContentGroup()
  <Import Project="$(MSBuildBinPath)\Microsoft.@(SampleHelper.VaryByLanguage("CSharp", "VisualBasic")).targets" />
  <Import Project="$(MSBuildExtensionsPath@(SampleHelper.VaryByFramework(null, null, "32")))\Microsoft\VisualStudio\v@(SampleHelper.VaryByVersion("8", "9", "10")).0\WebApplications\Microsoft.WebApplication.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
       Other similar extension points exist, see Microsoft.Common.targets.
  @if (ViewBag.Project.ViewEngine == ViewEngine.Mvc && ViewBag.Project.MvcVersion < MvcVersion.Mvc3)
  {
  <Target Name="BeforeBuild">
  </Target> @:-->
  <Target Name="AfterBuild" Condition="'$(MvcBuildViews)'=='true'">
    <AspNetCompiler VirtualPath="temp" PhysicalPath="$(ProjectDir)" />
  </Target>
  }
  else
  {
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  @:-->            
  }
  @if (ViewBag.Project.MvcVersion == MvcVersion.Mvc3)
  {
  <Target Name="MvcBuildViews" AfterTargets="AfterBuild" Condition="'$(MvcBuildViews)'=='true'">
    <AspNetCompiler VirtualPath="temp" PhysicalPath="$(WebProjectOutputDir)" />
  </Target>
  }
  @RenderBody()
  <ProjectExtensions>
    <VisualStudio>
      <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
        <WebProjectProperties>
          <UseIIS>False</UseIIS>
          <AutoAssignPort>True</AutoAssignPort>
          <DevelopmentServerPort>0</DevelopmentServerPort>
          <DevelopmentServerVPath>/</DevelopmentServerVPath>
          <IISUrl>
          </IISUrl>
          <NTLMAuthentication>False</NTLMAuthentication>
        </WebProjectProperties>
      </FlavorProperties>
    </VisualStudio>
  </ProjectExtensions>
</Project>
@helper RenderContentGroup()
    {
<ItemGroup>
@foreach (string path in ViewBag.ContentFiles)
{
@*    string fileName = Path.GetFileName(path);
    
    if (fileName.Equals("Web.config", StringComparison.InvariantCultureIgnoreCase) || fileName.Equals("Global.asax", StringComparison.InvariantCultureIgnoreCase))
    {
    <Content Include="@path">
      <SubType>Designer</SubType>
    </Content>
    }
    else
    {*@
    <Content Include="@path" />        
    @*}*@
}
</ItemGroup>
}

@helper RenderCodeGroup()
    {
<ItemGroup>
@foreach (string path in ViewBag.CodeFiles)
{
    string firstExtension = SampleHelper.GetFirstExtension(path);
    string pathWithFirstExtension = firstExtension != null ? SampleHelper.ChangeExtension(path, firstExtension) : null;

    if (pathWithFirstExtension != null && ((IEnumerable<string>)ViewBag.ContentFiles).Any(x => x == pathWithFirstExtension))
    {
    <Compile Include="@path">
      <DependentUpon>@Path.GetFileName(pathWithFirstExtension)</DependentUpon>
      @if (firstExtension.StartsWith(".aspx", StringComparison.InvariantCultureIgnoreCase))
      {
      <SubType>ASPXCodeBehind</SubType>
      }
    </Compile>
    }
    else
    {
    <Compile Include="@path" />        
    }
}
</ItemGroup>
}